The dynamic content delivery is a technique that is adapted to send customized contents to mobile client users on the basis of the C/S architecture. The user subscribes for the contents, and the server customizes the contents in accordance with the user's parameters, location, and presence information, etc, and delivers the contents to the client user at scheduled time.
During the process of sending the dynamic contents, sometimes the client or server may become inaccessible due to network congestion, power exhaustion of the client, or other reasons; therefore, the connection between the client and the server is broken, and the delivery of dynamic contents is interrupted. In such cases, the party which is normal will fall into a state of suspension. After the connection is recovered with the resume technique in Hyper Text Transport Protocol (HTTP) or File Transfer Protocol (FTP) or other protocols, the dynamic contents can be delivered from the previous breaking point, instead of being delivered from the beginning again.
The resume method in HTTP is as follows:
When the client requests to download a file from the server, the HTTP message header is as follows:
GET http://host.foo.bar/pic-dir/picture.gif
Host: host.foo.bar
Accept: image/gif, image/jpg
The HTTP response message from the server is as follows:
HTTP/1.1 200 OK
Server: CoolServer/1.3.12
Content-Length: 25432
Content-Type: image/gif
Accept-Ranges: bytes
ETag: fasd987sadf98@example.com/1.1
. . . GIF picture . . . .
The field Content-Length and the field Accept-Ranges indicate the file size is 25432 bytes. For some reason, the connection is broken after 1034 bytes have been sent. When the client requests the server to continue the delivery, the HTTP request message is as follows:
GET http://host.foo.bar/pic-dir/picture.gif
Host: host.foo.bar
Accept: image/gif, image/jpg
Range: 1034-25431
If-Match: fasd987sadf98@example.com/1.1
The field Range indicates the requested range of the resume delivery, i.e. starting the delivery from the 1034th byte of the file. The response message from the server is as follows:
HTTP/1.1 206 Partial Content
Server: CoolServer/1.3.12
Content-range: bytes 1034-25431/25432
Content-Type: image/gif
Accept-Ranges: bytes
ETag: fasd987sadf98@example.com/1.1
The response message uses a state code 206, which indicates the start of partial delivery now; the field Content-Length indicates the part to be delivered, and is denoted in byte; and after the server responds to the client with the above message, the subsequent content delivery process will be identical with the delivery process in normal condition.
However, the method of resume delivery from breakpoint in the conventional art has the following drawbacks:
Before the connection is recovered to normal, the dynamic information of the user client may have changed, such as client capability, the presence state of the client, etc. For example, when the user drives a car and requests traffic condition information, the server that transmits the dynamic contents will send the traffic condition information of a certain road section to the client, in accordance with the current location of the user; in the case that the connection is interrupted during the delivery process due to some causes, such as network failure, if the server instantly employs the resume method in the conventional art to transmit the traffic condition information that is not delivered completely to the client after the connection is recovered to normal, the user may be misled by the information. This is because the user is in a moving state and his geographical location has been changed. Therefore, the traffic condition information of the original road section is not needed now. Therefore, in the conventional art, when the delivery of dynamic contents is resumed, since the dynamic content that is not delivered completely is delivered instantly from the previous breakpoint to the client without analysis of the dynamic information of the client, if the delivered dynamic content no longer meets the user's demand, it will not only waste the network bandwidth but also degrade the user experience.